import os

def get_files(startpath):
    file_paths = []  # 存储文件路径的列表

    for root, dirs, files in os.walk(startpath):
        for file in files:
            file_path = os.path.relpath(os.path.join(root, file), start=startpath)
            file_path = file_path.replace('\\', '/')  # 将 \ 替换为 /
            file_paths.append(file_path)  # 将文件路径添加到列表中

    return file_paths

# 指定要遍历的文件夹路径
folder_path = '..'

# 获取文件路径列表
file_paths = get_files(folder_path)

# 打印文件路径列表
for path in file_paths:
    print(path)
